<?php

namespace App\Models\Admin;

use Illuminate\Database\Eloquent\Model;

class Role extends Model
{
    protected $table='admin_role';

    protected $hidden = [
        'created_at', 'updated_at',
    ];

    public function permissions(){
    	return $this->belongsToMany(Permission::class,'admin_permission_role','role_id','permission_id');
    }

    public function users(){
    	return $this->belongsToMany(Admin::class,'admin_role_user','role_id','admin_id');
    }
}
